/*
 * job.cpp
 *
 *  Created on: 17/06/2011
 *      Author: Idan
 */

#include "job.h"
#include "mtm.h"
#include <exception>





int Job::isPriorityLegalReturn(int newPriority){
	if(0>newPriority ||  newPriority>100){
		throw InvalidPriority();
	}
	return newPriority;
}

Job::Job(const Matrix& A, const Matrix& B,int priority,const int jobID):
		priority(isPriorityLegalReturn(priority)),jobID(jobID),
		matrix1(A),matrix2(B){}
void Job::changePriority(int newPriority){
	priority = isPriorityLegalReturn(newPriority);
}
int Job::getJobID() const{
	return jobID;
}
int Job::getPriority() const{
	return priority;
}
Job::~Job() {}
